<?php
/**
 * 队列，清洗wiki
 */

use Biz\service\wiki\WikiClean;


class CleaningWikiAction extends QueueActionPlugin
{
    public function main()
    {
        $sign = $this->getRequest()->getPost("sign");
        $result = $this->getRequest()->getPost("result");
        \Doraemon\tools\Log::wiki_queueCleaning_info(json_encode(['sign' => $sign, 'result' => $result]));
        if ($result["code"] == 1) {
            WikiClean::clean($sign, $result);
        }

        return $this->setSuccess();
    }
}